package com.yyx.app1.CommonControls;

import android.content.Context;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.yyx.app1.R;

import org.androidannotations.annotations.EViewGroup;
import org.androidannotations.annotations.ViewById;
import org.androidannotations.annotations.res.ColorRes;

/**
 * Created by yuexing on 2015/10/15.
 */
@EViewGroup(R.layout.button_viewpager)
public class ViewPager_SelectButton extends LinearLayout {
    private Context context;
    @ViewById
    TextView button_viewpager_text;

    @ViewById
    ImageView button_viewpager_image;

    @ViewById
    LinearLayout button_viewpager_line;

    @ColorRes
    int gray_unselcet_font;

    public void bind(String text , int drawable)
    {
        button_viewpager_text.setTextColor(gray_unselcet_font);
        button_viewpager_text.setText(text);
        button_viewpager_image.setImageResource(drawable);
    }

    public ViewPager_SelectButton(Context context) {
        super(context);
        this.context = context;
    }

    public ViewPager_SelectButton(Context context, AttributeSet attrs) {
        super(context, attrs);
        this.context = context;
    }

    public ViewPager_SelectButton(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        this.context = context;
    }

    public TextView getButton_viewpager_text() {
        return button_viewpager_text;
    }

    public void setButton_viewpager_text(TextView button_viewpager_text) {
        this.button_viewpager_text = button_viewpager_text;
    }

    public ImageView getButton_viewpager_image() {
        return button_viewpager_image;
    }

    public void setButton_viewpager_image(ImageView button_viewpager_image) {
        this.button_viewpager_image = button_viewpager_image;
    }

    public LinearLayout getButton_viewpager_line() {
        return button_viewpager_line;
    }

    public void setButton_viewpager_line(LinearLayout button_viewpager_line) {
        this.button_viewpager_line = button_viewpager_line;
    }
}
